local hx__zhijin = fk.CreateSkill {
  name = "hx__zhijin",
  tags = { Skill.Compulsory, },
}

hx__zhijin:addEffect(fk.TargetSpecifying, {
  anim_type = "drawcard",
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(hx__zhijin.name) then
      return data.from ~= player and #player:getCardIds{Player.Equip} == 0
    end
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(2, hx__zhijin.name)
  end,
})

hx__zhijin:addEffect("distance", {
  correct_func = function(self, from, to)
    if to:hasSkill(hx__zhijin.name) and #to:getCardIds{Player.Equip} > 0 then
      return 2 + #to:getCardIds{Player.Equip}
    end
  end,
})

return hx__zhijin